package com.zl.learning.object.event;

import static com.zl.learning.object.event.EventBus.EventName.FTP_UPLOAD_SUCCESS;

public class EventBusTest {
    public static void main(String[] args) {
        EventBus.on(FTP_UPLOAD_SUCCESS, o -> {
            System.out.println("我是订阅者1："+o);
        });
        EventBus.on(FTP_UPLOAD_SUCCESS, o -> {
            System.out.println("我是订阅者2："+o);
        });
        EventBus.publish(FTP_UPLOAD_SUCCESS, "上传成功");

        final EventBus.EventName aaa = EventBus.EventName.valueOf("FTP_UPLOAD_SUCCESS");
        System.out.println(aaa);
    }
}
